package fudan.se.project.service.infrastructure.func.conference.action.chair;


import fudan.se.project.controller.request.base.DateSet;
import fudan.se.project.domain.conference.Conference;
import fudan.se.project.service.infrastructure.entity.conference.ConferenceService;
import org.springframework.stereotype.Service;

@Service
public class ConferenceDatesModifyService {

    private final ConferenceService conferenceService;

    public ConferenceDatesModifyService(ConferenceService conferenceService) {
        this.conferenceService = conferenceService;
    }

    public boolean process(Conference conference, DateSet dateSet) {

        if (!dateSet.validateDates()) {
            return false;
        }
        conferenceService.modifyConferenceDates(conference, dateSet);
        return true;
    }


}
